package com.tong.embeddedvr.Mapper;

import com.tong.embeddedvr.entity.StatisticEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface StatisticMapper {

    @Update("UPDATE statistic SET statistic_count = statistic_count + 1 WHERE statistic_name = #{name}")
    public void increaseCount(String name);

    @Select("SELECT * FROM statistic")
    public StatisticEntity[] getAll();
}